package com.witmed.lib_http

import retrofit2.Retrofit

class NetWorkFactory {
    companion object{
        private var noneRetrofit:Retrofit=NoneRetrofitImpl().createRetrofit()!!
        private var tokenRetrofit=TokenRetrofitImpl().createRetrofit()!!
        private lateinit var retrofit: Retrofit
        fun factory(type:HttpType?): Retrofit {
            when(type){
                HttpType.NONE->{
                    retrofit= noneRetrofit
                }
                HttpType.SIGN->{

                }
                HttpType.TOKEN->{
                    retrofit= tokenRetrofit
                }
                HttpType.TOKENSIGN->{

                }
                else->{

                }
            }
            return retrofit
        }
    }
}